Hi Russ,
Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ?
Regards TK
Group: DynoMotion |
Message: 9747 |
From: Russ Larson |
Date: 6/30/2014 |
Subject: Re: Homing and Flags |
Tom, I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Russ 
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 2:17 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9748 |
From: Tom Kerekes |
Date: 6/30/2014 |
Subject: Re: Homing and Flags |
Hi Russ,
In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5?
Regards TK
Group: DynoMotion |
Message: 9749 |
From: Russ Larson |
Date: 6/30/2014 |
Subject: Re: Homing and Flags [1 Attachment] |
Tom, OK, now I see that will check and let you know. Thanks Russ From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 4:30 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] [Attachment(s) from Tom Kerekes included below] In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? 
Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9755 |
From: Russ Larson |
Date: 6/30/2014 |
Subject: Re: Homing and Flags [1 Attachment] |
Tom, We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... DoButton(24); DoButton(23); DoButton(22); DoButton(25); DoOEMButton(133); DoOEMButton(134); DoOEMButton(135); Do we need to change something in here? Russ From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 4:30 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] [Attachment(s) from Tom Kerekes included below] In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? 
Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9756 |
From: Tom Kerekes |
Date: 6/30/2014 |
Subject: Re: Homing and Flags |
Hi Russ,
As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not.
Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow persistent. Did you ever do this?
Maybe add a RefCombination(0) at the beginning?
HTH Regards TK
From: "'Russ Larson' rdlarson@... [DynoMotion]" <DynoMotion@yahoogroups.com> To: DynoMotion@yahoogroups.com Sent: Monday, June 30, 2014 5:41 PM Subject: RE: [DynoMotion] Homing and Flags
Tom, We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... DoButton(24); DoButton(23); DoButton(22); DoButton(25); DoOEMButton(133); DoOEMButton(134); DoOEMButton(135); Do we need to change something in here? Russ From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 4:30 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 |
Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5]
has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to
do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would
allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9757 |
From: Russ Larson |
Date: 6/30/2014 |
Subject: Re: Homing and Flags [1 Attachment] |
Tom, Think we have found the issue. In the file HomeMM_V7.c, they use the following define #define REQUESTED_HOME_AXIS_FLAGS 20 (This probably should have been 5) since this was included in the distro we assumed it had been tested. Now we see the correct axis coming into the homing routine. Russ From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 9:56 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] [Attachment(s) from Tom Kerekes included below] As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not. Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow persistent. Did you ever do this? Maybe add a RefCombination(0) at the beginning? We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... Do we need to change something in here? In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9758 |
From: Russ Larson |
Date: 7/1/2014 |
Subject: Re: Homing and Flags |
Tom, Actually what we did to get this to pass the flags correctly was to go into the beginning of main in the HomeMM_V7.c program and add the following lines. int flags persist.data[5]; REQUESTED_HOME_FLAGS = flags; When we add this to that program at least the machine homes correctly and only once per axis. Was that home routine written for KmotionCNC primarily? We found several issues that others probably stumbled on as well. One for example is that program only supports positive logic homing sensors. Most optical sensors are active low when the flag enters the sensor. We had to adjust for that or it always thought it was home and got confused. On the MPG front that will be more challenging. The MPG itself moves just fine since it is connected directly to the KFLOP the response is clean and smooth. Attempting to use it for override will be the challenge. In MACH3 this works via a Brain, and it works correctly. In that case the MPG is connected to a second parallel port. We will run some more experiments by perhaps telling MACH3 that the MPG is connected and perhaps using a Brain again. I read if you configure Mach with IO it will make the encoder inoperable. So close yet so far, each day we get a little closer to getting this completed. Russ 7. Within Mach3 - configure IO Bits. Various M Codes may be used within Mach3 to activate IO bits on KMotion. Select the Menu Config|Ports & Pins to bring up the Dialog shown below. When using the KMotion Plugin, Pin Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port Pins. Some of the terminology on the screen may be misleading as it was designed expecting to use a parallel port. For IO bit numbers less than 128 specify Port#1. For IO bit numbers 128 or larger, subtract 128 from the bit number and specify Port #2 instead of Port #1. Extended Virtual IO bits 1024-1151 may also be accessed by specifying Port #3 and subtracting 1024 from the bit number (note: the first 32 Virtual IO will consume less USB bandwidth because they are uploaded in the KFLOP Bulk Status record so use the first 32 if possible). Note Mach3 typically defaults after an initial install with Output #1 enabled for spindle control on Pin0 (as shown below). Bit 0 is often used on a KMotion board as an Encoder input. Having Mach configure the IO bit as an output will cause the encoder to be inoperable. Disable the output if this is the case. From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 10:39 PM To: DynoMotion@yahoogroups.com Subject: RE: [DynoMotion] Homing and Flags Tom, Think we have found the issue. In the file HomeMM_V7.c, they use the following define #define REQUESTED_HOME_AXIS_FLAGS 20 (This probably should have been 5) since this was included in the distro we assumed it had been tested. Now we see the correct axis coming into the homing routine. Russ [Attachment(s) from Tom Kerekes included below] As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not. Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow persistent. Did you ever do this? Maybe add a RefCombination(0) at the beginning? We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... Do we need to change something in here? In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9761 |
From: Tom Kerekes |
Date: 7/1/2014 |
Subject: Re: Homing and Flags |
Hi Russ,
That Home program was originally written for MM (Machine Manager-a control Application a User was trying to develop). It was designed to be very flexible and to allow the Host Application to specify which axes, which order, in which groups, which direction, which polarity, which speed, which mode, etc... We ship a V8 now. I don't remember what issues were with
V7. But any Homing code can be used with any Host Application (Mach3, KMotionCNC, MM) as long as the parameters are passed properly.
Regarding the MPG: we want to solve this. Another User is requesting MPG driven SSO and FRO. But we will need to research it. Do you have the Brain code that was used before. It may give us some clues.
Regarding: "I read if you configure Mach with IO it will make the encoder inoperable." I think you are misunderstanding. Only if you inadvertently configure an encoder input as an output in Mach3 will it prevent the encoder from working.
But I don't think a Brain running under Windows will be fast enough or reliable watching the MPG quadrature signals
directly. What might work is for KFLOP to count and maintain the MPG position and then the position could be uploaded and used by a Brain or Basic program to change the SSO or FRO.
Regards TK
From: "'Russ Larson' rdlarson@... [DynoMotion]"
<DynoMotion@yahoogroups.com> To: DynoMotion@yahoogroups.com Sent: Tuesday, July 1, 2014 5:40 AM Subject: RE: [DynoMotion] Homing and Flags
Tom, Actually what we did to get this to pass the flags correctly was to go into the beginning of main in the HomeMM_V7.c program and add the following lines. int flags persist.data[5]; REQUESTED_HOME_FLAGS = flags; When we add this to that program at least the machine homes correctly and only once per axis. Was that home routine written for KmotionCNC primarily? We found several issues that others probably stumbled on as well. One for example is that program only supports positive logic homing sensors. Most optical sensors are active low when the flag enters the sensor. We had to adjust for that or it always thought it was home and got confused. On the MPG front that will be more challenging. The MPG itself moves just fine since it is connected directly to the KFLOP the response is clean and smooth. Attempting to use it for override will be the challenge. In MACH3 this works via a Brain, and it works correctly. In that case the MPG is connected to a second parallel port. We will run some more experiments by perhaps telling MACH3 that the MPG is connected and perhaps using a Brain again. I read if you configure Mach with IO it will make the encoder inoperable. So close yet so far, each day we get a little closer to getting this completed. Russ 7. Within Mach3 - configure IO Bits. Various M Codes may be used within Mach3 to activate IO bits on KMotion. Select the Menu Config|Ports & Pins to bring up the Dialog shown below. When using the KMotion Plugin, Pin Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port Pins. Some of the terminology on the screen may be misleading as it was designed expecting to use a parallel port. For IO bit numbers less than 128 specify Port#1. For IO bit numbers 128 or larger, subtract 128 from the bit number and specify Port #2 instead of Port #1. Extended Virtual IO bits 1024-1151 may also be accessed by specifying Port #3 and subtracting 1024 from the bit number (note: the first 32 Virtual IO will consume less USB bandwidth because they are uploaded in the KFLOP Bulk Status record so use the first 32 if possible). Note Mach3 typically defaults after an initial install with Output #1 enabled for spindle control on Pin0 (as shown below). Bit 0 is often used on a KMotion board as an Encoder input. Having Mach configure the IO bit as an output will cause the encoder to be inoperable. Disable the output if this is the case. From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Monday, June 30, 2014 10:39 PM To: DynoMotion@yahoogroups.com Subject: RE: [DynoMotion] Homing and Flags Tom, Think we have found the issue. In the file HomeMM_V7.c, they use the following define #define REQUESTED_HOME_AXIS_FLAGS 20 (This probably should have been 5) since this was included in the distro we assumed it had been tested. Now we see the correct axis coming into the homing routine. Russ As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not. Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow
persistent. Did you ever do this? Maybe add a RefCombination(0) at the beginning? We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... Do we need to change something in here? In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does
you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in
your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9764 |
From: Russ Larson |
Date: 7/1/2014 |
Subject: Re: Homing and Flags [1 Attachment] |
Tom, Yes, I have the brains, and will send them shortly. This is a very common situation and many people have pendants with that feature. Yes, the homing routine was very flexible, i will need to do a diff of V7 to V8 to see what changed. Was not sure if the way we adjusted to get the flags was correct. I will soon have a much better documented version of the V8 homing routine with all the things discovered along the way including your comments on making sure IO is not enabled in MACH3. I have also included the text of the original author that explains how the routine works. Always nice to have that stuff in the beginning of the file for future users. Right now making the change we made allows the machine to home correctly, just wanted to make it clean so the next user of this program will benefit by our learnings. A few other observations.... If we hit the reset button manually or by a limit, it never lets you know the machine needs to be homed again, the homing LEDS are still green. I need to run my other machine with just MACH3 and see if they don't turn RED, can recall for sure. We did implement the cycle start and pause as you suggested, but we were very surprised that it takes about 3 seconds to pause the machine with the plugin configured to 1 second buffer. At a lower buffer of say 0.2 seconds it would starve for data. We finally got it running at 0.5 seconds. In Mach3 when the machine was running gcode you could hit the space bar and the machine who pause almost instantly, so this was a big change. We might have done something wrong on that front as well. I will run out to the machine and get the brains and some details on how it worked shortly. Thanks for all your help Tom. Russ
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Tuesday, July 01, 2014 1:36 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] [Attachment(s) from Tom Kerekes included below] That Home program was originally written for MM (Machine Manager-a control Application a User was trying to develop). It was designed to be very flexible and to allow the Host Application to specify which axes, which order, in which groups, which direction, which polarity, which speed, which mode, etc... We ship a V8 now. I don't remember what issues were with V7. But any Homing code can be used with any Host Application (Mach3, KMotionCNC, MM) as long as the parameters are passed properly. Regarding the MPG: we want to solve this. Another User is requesting MPG driven SSO and FRO. But we will need to research it. Do you have the Brain code that was used before. It may give us some clues. Regarding: "I read if you configure Mach with IO it will make the encoder inoperable." I think you are misunderstanding. Only if you inadvertently configure an encoder input as an output in Mach3 will it prevent the encoder from working. But I don't think a Brain running under Windows will be fast enough or reliable watching the MPG quadrature signals directly. What might work is for KFLOP to count and maintain the MPG position and then the position could be uploaded and used by a Brain or Basic program to change the SSO or FRO. Actually what we did to get this to pass the flags correctly was to go into the beginning of main in the HomeMM_V7.c program and add the following lines. int flags persist.data[5]; REQUESTED_HOME_FLAGS = flags; When we add this to that program at least the machine homes correctly and only once per axis. Was that home routine written for KmotionCNC primarily? We found several issues that others probably stumbled on as well. One for example is that program only supports positive logic homing sensors. Most optical sensors are active low when the flag enters the sensor. We had to adjust for that or it always thought it was home and got confused. On the MPG front that will be more challenging. The MPG itself moves just fine since it is connected directly to the KFLOP the response is clean and smooth. Attempting to use it for override will be the challenge. In MACH3 this works via a Brain, and it works correctly. In that case the MPG is connected to a second parallel port. We will run some more experiments by perhaps telling MACH3 that the MPG is connected and perhaps using a Brain again. I read if you configure Mach with IO it will make the encoder inoperable. So close yet so far, each day we get a little closer to getting this completed. 7. Within Mach3 - configure IO Bits. Various M Codes may be used within Mach3 to activate IO bits on KMotion. Select the Menu Config|Ports & Pins to bring up the Dialog shown below. When using the KMotion Plugin, Pin Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port Pins. Some of the terminology on the screen may be misleading as it was designed expecting to use a parallel port. For IO bit numbers less than 128 specify Port#1. For IO bit numbers 128 or larger, subtract 128 from the bit number and specify Port #2 instead of Port #1. Extended Virtual IO bits 1024-1151 may also be accessed by specifying Port #3 and subtracting 1024 from the bit number (note: the first 32 Virtual IO will consume less USB bandwidth because they are uploaded in the KFLOP Bulk Status record so use the first 32 if possible). Note Mach3 typically defaults after an initial install with Output #1 enabled for spindle control on Pin0 (as shown below). Bit 0 is often used on a KMotion board as an Encoder input. Having Mach configure the IO bit as an output will cause the encoder to be inoperable. Disable the output if this is the case. Think we have found the issue. In the file HomeMM_V7.c, they use the following define #define REQUESTED_HOME_AXIS_FLAGS 20 (This probably should have been 5) since this was included in the distro we assumed it had been tested. Now we see the correct axis coming into the homing routine. As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not. Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow persistent. Did you ever do this? Maybe add a RefCombination(0) at the beginning? We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... Do we need to change something in here? In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9765 |
From: Russ Larson |
Date: 7/1/2014 |
Subject: Re: Homing and Flags [1 Attachment] |
Tom, Here is an example Brain for Mach3 that takes MGP input to handle Feedrate Override Russ Parallel Port MPG to control the FRO, even during program execution. Here is a screen shot of the brain and macro. It uses two userdro's and one userled for this application. The macro can be assigned to a button on the screen and the userled acts as an indication of enabling of this function. Several people on the zone use similar brains to adjust feedrate. 
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Tuesday, July 01, 2014 1:36 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] [Attachment(s) from Tom Kerekes included below] That Home program was originally written for MM (Machine Manager-a control Application a User was trying to develop). It was designed to be very flexible and to allow the Host Application to specify which axes, which order, in which groups, which direction, which polarity, which speed, which mode, etc... We ship a V8 now. I don't remember what issues were with V7. But any Homing code can be used with any Host Application (Mach3, KMotionCNC, MM) as long as the parameters are passed properly. Regarding the MPG: we want to solve this. Another User is requesting MPG driven SSO and FRO. But we will need to research it. Do you have the Brain code that was used before. It may give us some clues. Regarding: "I read if you configure Mach with IO it will make the encoder inoperable." I think you are misunderstanding. Only if you inadvertently configure an encoder input as an output in Mach3 will it prevent the encoder from working. But I don't think a Brain running under Windows will be fast enough or reliable watching the MPG quadrature signals directly. What might work is for KFLOP to count and maintain the MPG position and then the position could be uploaded and used by a Brain or Basic program to change the SSO or FRO. Actually what we did to get this to pass the flags correctly was to go into the beginning of main in the HomeMM_V7.c program and add the following lines. int flags persist.data[5]; REQUESTED_HOME_FLAGS = flags; When we add this to that program at least the machine homes correctly and only once per axis. Was that home routine written for KmotionCNC primarily? We found several issues that others probably stumbled on as well. One for example is that program only supports positive logic homing sensors. Most optical sensors are active low when the flag enters the sensor. We had to adjust for that or it always thought it was home and got confused. On the MPG front that will be more challenging. The MPG itself moves just fine since it is connected directly to the KFLOP the response is clean and smooth. Attempting to use it for override will be the challenge. In MACH3 this works via a Brain, and it works correctly. In that case the MPG is connected to a second parallel port. We will run some more experiments by perhaps telling MACH3 that the MPG is connected and perhaps using a Brain again. I read if you configure Mach with IO it will make the encoder inoperable. So close yet so far, each day we get a little closer to getting this completed. 7. Within Mach3 - configure IO Bits. Various M Codes may be used within Mach3 to activate IO bits on KMotion. Select the Menu Config|Ports & Pins to bring up the Dialog shown below. When using the KMotion Plugin, Pin Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port Pins. Some of the terminology on the screen may be misleading as it was designed expecting to use a parallel port. For IO bit numbers less than 128 specify Port#1. For IO bit numbers 128 or larger, subtract 128 from the bit number and specify Port #2 instead of Port #1. Extended Virtual IO bits 1024-1151 may also be accessed by specifying Port #3 and subtracting 1024 from the bit number (note: the first 32 Virtual IO will consume less USB bandwidth because they are uploaded in the KFLOP Bulk Status record so use the first 32 if possible). Note Mach3 typically defaults after an initial install with Output #1 enabled for spindle control on Pin0 (as shown below). Bit 0 is often used on a KMotion board as an Encoder input. Having Mach configure the IO bit as an output will cause the encoder to be inoperable. Disable the output if this is the case. Think we have found the issue. In the file HomeMM_V7.c, they use the following define #define REQUESTED_HOME_AXIS_FLAGS 20 (This probably should have been 5) since this was included in the distro we assumed it had been tested. Now we see the correct axis coming into the homing routine. As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not. Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow persistent. Did you ever do this? Maybe add a RefCombination(0) at the beginning? We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... Do we need to change something in here? In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
Group: DynoMotion |
Message: 9766 |
From: Russ Larson |
Date: 7/1/2014 |
Subject: Re: Homing and Flags [1 Attachment] |
Tom, Here is another Brain for MPG control of feedrate or spindle. This is from CNC4PC who sells boards for 2nd parallel port, etc. Very similar implementation. Russ From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] Sent: Tuesday, July 01, 2014 1:36 PM To: DynoMotion@yahoogroups.com Subject: Re: [DynoMotion] Homing and Flags [1 Attachment] [Attachment(s) from Tom Kerekes included below] That Home program was originally written for MM (Machine Manager-a control Application a User was trying to develop). It was designed to be very flexible and to allow the Host Application to specify which axes, which order, in which groups, which direction, which polarity, which speed, which mode, etc... We ship a V8 now. I don't remember what issues were with V7. But any Homing code can be used with any Host Application (Mach3, KMotionCNC, MM) as long as the parameters are passed properly. Regarding the MPG: we want to solve this. Another User is requesting MPG driven SSO and FRO. But we will need to research it. Do you have the Brain code that was used before. It may give us some clues. Regarding: "I read if you configure Mach with IO it will make the encoder inoperable." I think you are misunderstanding. Only if you inadvertently configure an encoder input as an output in Mach3 will it prevent the encoder from working. But I don't think a Brain running under Windows will be fast enough or reliable watching the MPG quadrature signals directly. What might work is for KFLOP to count and maintain the MPG position and then the position could be uploaded and used by a Brain or Basic program to change the SSO or FRO. Actually what we did to get this to pass the flags correctly was to go into the beginning of main in the HomeMM_V7.c program and add the following lines. int flags persist.data[5]; REQUESTED_HOME_FLAGS = flags; When we add this to that program at least the machine homes correctly and only once per axis. Was that home routine written for KmotionCNC primarily? We found several issues that others probably stumbled on as well. One for example is that program only supports positive logic homing sensors. Most optical sensors are active low when the flag enters the sensor. We had to adjust for that or it always thought it was home and got confused. On the MPG front that will be more challenging. The MPG itself moves just fine since it is connected directly to the KFLOP the response is clean and smooth. Attempting to use it for override will be the challenge. In MACH3 this works via a Brain, and it works correctly. In that case the MPG is connected to a second parallel port. We will run some more experiments by perhaps telling MACH3 that the MPG is connected and perhaps using a Brain again. I read if you configure Mach with IO it will make the encoder inoperable. So close yet so far, each day we get a little closer to getting this completed. 7. Within Mach3 - configure IO Bits. Various M Codes may be used within Mach3 to activate IO bits on KMotion. Select the Menu Config|Ports & Pins to bring up the Dialog shown below. When using the KMotion Plugin, Pin Numbers now correspond to KMotion IO Bit Numbers rather than Parallel port Pins. Some of the terminology on the screen may be misleading as it was designed expecting to use a parallel port. For IO bit numbers less than 128 specify Port#1. For IO bit numbers 128 or larger, subtract 128 from the bit number and specify Port #2 instead of Port #1. Extended Virtual IO bits 1024-1151 may also be accessed by specifying Port #3 and subtracting 1024 from the bit number (note: the first 32 Virtual IO will consume less USB bandwidth because they are uploaded in the KFLOP Bulk Status record so use the first 32 if possible). Note Mach3 typically defaults after an initial install with Output #1 enabled for spindle control on Pin0 (as shown below). Bit 0 is often used on a KMotion board as an Encoder input. Having Mach configure the IO bit as an output will cause the encoder to be inoperable. Disable the output if this is the case. Think we have found the issue. In the file HomeMM_V7.c, they use the following define #define REQUESTED_HOME_AXIS_FLAGS 20 (This probably should have been 5) since this was included in the distro we assumed it had been tested. Now we see the correct axis coming into the homing routine. As an experiment you might configure to use the simple example HomeMach3.c which just prints persist.UserData[5] flags to see if it correct or not. Googling I found there is an option to have Mach3 send a 7 by calling RefCombination(7). I don't know it that is somehow persistent. Did you ever do this? Maybe add a RefCombination(0) at the beginning? We have confirmed we do indeed have a "5" for the variable flag. We have also turned on the PRINTF function in that MMHome_V7.c program and we can see we are always getting a 7 coming into that home program from Mach3. This is why it always homes all three axis three times. The REFALLHOME button in Mach3 script looks like this... Do we need to change something in here? In the screen shot you attached do you see in the Home Section a Variable flags setting of 5? Does you system have that also set to 5? I am not sure where that gets configured in the plugin? This is a screenshot in your manual we have the homing routine specified in the Home area, but I don't see anything about the Var(5) variable? Is that maybe in Mach3? Strange I haven't seen that issue before. Do you have the correct Var (5) specified in the Mach3 | Dynomotion Plugin Configuration ? Is there some document that talks about the persist.UserData[x] in more detail. We have the HomeMM_v7.c homing routine modified and running fine with Kmotion. We can hit the REF-ALL button in Mach3 and it homes all axis three times. If we tell it to refX, then it homes all axis's one time. The vbscript for REF-ALL just calls RefZ, RefY, RefX. We notice that the persist.UsserData[5] has the Mach3 flags and it is a binary view of the X,Y,Z flags. But no matter which button we press it always comes as "7" meaning X,Y, and Z. How does that get defined when it gets sent from KFLOP plugin to Kmotion to be processed. Maybe we missed another document. //Plugin calls for Mach3 Home (actually Purge) Commands int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc... printf("Mach3 Home Call, flags = %d\n",flags); //XXXXXXXXXXXXXXXXXXXXXX START OF X-AXIS Home Switch XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Mach3 has a quirk if Homing Inputs are enabled in Mach3 | Config | Ports and Pins | Input Signals | X Home, Y Home, Z Home, A Home, B Home, C Home then Mach 3 will NOT call the Plugin to do Homing. Please make sure these Inputs are NOT enabled. KFLOP performs the Homing operation not Mach3 so Mach3 doesn't need to know anything about which inputs are used.
I think the standard Mach3 REF ALL HOME button has code to do the axis order you describe. If not you can change the button code for REF ALL HOME.
Regarding why "flags" is tested for 1, 2 and 4 is because "flags" is intended to be a binary number where each bit represents an axis so that any or all axes can be commanded to home at one time.
1 = bit0 = 2^0 2 = bit1 = 2^1 4 = bit2 = 2^2 8 = bit3 = 2^3
That would allow a value like 7 (1+2+4) to home x,y,z. But Mach3 never seems to home more than one axis at a time.
HTH Regards
|
|
|
|
Group: DynoMotion |
Message: 9774 |
From: Tom Kerekes |
Date: 7/4/2014 |
Subject: Re: Homing and Flags |
Hi Russ,
Thanks for the brain. That may give us some clues.
Regarding feedhold: That is a consequence of buffering to have reliable operation under
Windows without dependency on tight timing under windows. There is a way to do instant hardware feedhold. See the ExternalFeedhold.c example. This is 100% guaranteed to be instant as it doesn't involve the PC/Windows/USB/Mach3. It is also possible to add or change a screen button to "notify" KFLOP to do a hardware feedhold. This will be almost always instant in the same way as Mach3 with the parallel port driver was.
The disadvantage of KFLOP's hardware feed hold is Mach3 is basically unaware it happens, so you are not able to Jog, change offsets, etc without hitting Stop
first.
HTH Regards TK
Group: DynoMotion |
Message: 11931 |
From: baltar.chris |
Date: 7/22/2015 |
Subject: Re: Homing and Flags [1 Attachment] |
Can be shared again? Seems like all the links here and other sites where this was posted is no longer valid.
-chris
|
|
Group: DynoMotion |
Message: 11932 |
From: Tom Kerekes |
Date: 7/22/2015 |
Subject: Re: Homing and Flags |
Hi Chris,
What exactly are you looking for?
Regards TK
Group: DynoMotion |
Message: 11938 |
From: baltar.chris |
Date: 7/22/2015 |
Subject: Re: Homing and Flags |
The homing routine, v7 was the old one I am guessing there is a v8 or v9 by now?
I have 4 axis but 5 motors.
X, Y*2, Z, (A or B)
I would like to be able to independently home the axis's I dont care if this happens in Mach3 or KMotionCNC
Regards, -Chris
|
|
Group: DynoMotion |
Message: 11939 |
From: Tom Kerekes |
Date: 7/22/2015 |
Subject: Re: Homing and Flags |
Hi Chris,
The later Test Versions contain the generalized example HomeMM_V8.c see attached.
Also attached is a more specifically coded example HomeSlaved.c to home a pair of slaved axes.
HTH Regards TK
| | | | | | | | | |